﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GKQC.Common
{
    public class QcFormBase : Form
    {
        /// <summary>
        /// 测试值乘数
        /// </summary>
        public decimal ValueRate = 1;

        /// <summary>
        /// 账套号
        /// </summary>
        public static string Account { get; set; }

        public List<Form> SubFormList { get; protected set; }
        public static string Version { get; set; } = string.Empty;
        public QcFormBase ParentBillForm { get; set; }
        /// <summary>
        /// 单据类型代号  
        /// 
        /// IQC:
        /// 001辅料  100鋁華司  101導針  102膠管  103墊片  104膠蓋  
        /// 105蓋板  106鋁殼  114鋁箔  115电解液  155電解紙 800电气胶纸  801载带  802车载基座 803基座
        /// 
        /// IPQC:
        /// </summary>
        public string BillType { get; set; } = "999";

    /// <summary>
    /// 是否一次测试两个单据，用于自动测试仪  金立公司
    /// </summary>
        public bool IsDoubleTest { get; set; } = false;

        public void SetTitle(string title)
        {
            try
            {
                if (!string.IsNullOrWhiteSpace(title))
                    this.Text = title;
            }
            catch (Exception ex)
            {
                Logger.LogError(ex);
            }
        }

        /// <summary>
        /// 设置检测界面的默认检测项目
        /// </summary>
        public virtual void SetTestItem(string testItem) { }

        public int ChargeTime { get; set; }

        public virtual void BingdingGridData<T>(string gridview, List<T> datas)
        {

        }
    }
}
